<template>
  <el-config-provider :locale="locale">
    <router-view></router-view>
    <GlobalSetting/>
  </el-config-provider>
</template>

<script setup lang="ts">
import { ElConfigProvider } from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import en from 'element-plus/dist/locale/en.mjs'
import { useLocale } from '@/hooks/locale';
import GlobalSetting from '@/components/globalSetting/index.vue'

const {currentLocale} = useLocale()

const locale = computed(() => currentLocale.value == 'zhCn'?zhCn:en)

</script>

<style lang="scss">
#app{
  width: 100%;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
</style>
